<template>
	<view class="share-comment-pop" :class="{'outAni':isInOuting}">
		<image class="apply-msg-img" src="../../static/commentPopBg.png"></image>

		<view class="apply-msg-content">
			<view class="content-title">
				<text class="title-text">分享点评确认</text>
				<image class="close-icon" src="../../static/closeIconBlack.png" @tap="closePop"></image>
			</view>

			<view class="apply-from-msg">
				<image class="from-msg-avatar" src="../../static/testUserIcon.png"></image>
				<view class="from-msg-text">梅兰花</view>
				<view class="from-msg-text2">想要分享你的点评给 </view>
				<image class="from-msg-avatar" src="../../static/testUserIcon.png"></image>
				<view class="from-msg-text">梅兰花</view>
			</view>

			<view class="apply-remark">
				点击同意之后表示您愿意将点评分享给别人，您也愿意介绍被评人给被分享人认识。
			</view>

		
			<view class="btns">
				<view class="short-btn">同意</view>
				<view class="short-btn red">拒绝</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			shareData: {
				type: Object,
				required: true
			}
		},
		data() {
			return {
				isInOuting: false
			}
		},
		mounted() {

		},
		methods: {
			closePop() {
				this.isInOuting = true
				setTimeout(() => {
					this.$emit('close', this.shareData.id)
				}, 300)
			}
		}
	}
</script>

<style lang="less" scoped>
	.share-comment-pop {
		position: fixed;
		z-index: 100;
		bottom: 0;
		left: 0;
		height: 594rpx;
		width: 100%;
		box-sizing: border-box;
		background-color: #FFFFFF;
		animation: slideIn 0.3s forwards;

		&.outAni {
			animation: slideOut 0.3s forwards;
		}

		.apply-msg-img {
			width: 750rpx;
			height: 594rpx;
		}

		.apply-msg-content {
			position: absolute;
			top: -14rpx;
			left: 0;
			width: 100%;
			padding: 54rpx 56rpx;
			padding-bottom: 86rpx;
			box-sizing: border-box;

			.content-title {
				margin-bottom: 80rpx;
				position: relative;
				height: 50rpx;
				display: flex;
				justify-content: center;

				.title-text {
					font-size: 36rpx;
					font-weight: 500;
					line-height: 50rpx;
				}

				.close-icon {
					width: 40rpx;
					height: 40rpx;
					position: absolute;
					top: 0rpx;
					right: -10rpx;
				}
			}

			.apply-from-msg {
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				.from-msg-avatar {
					width: 60rpx;
					height: 60rpx;
					border-radius: 50%;
					margin-right: 18rpx;
				}

				.from-msg-text {
					font-size: 30rpx;
					font-weight: 600;
					color: #333333;
					line-height: 42rpx;
				}
				.from-msg-text2{
					font-size: 28rpx;
					color: #666;
					line-height: 42rpx;
					margin:0 10rpx;
				}
			}

			.apply-remark {
				box-sizing: border-box;
				padding: 36rpx 0;
				font-size: 26rpx;
				font-weight: 400;
				color: #666;
				line-height: 44rpx;
			}


			.btns {
				margin-top: 24rpx;
				display: flex;
				justify-content: space-between;
				padding: 0 10rpx;

				.short-btn {
					height: 76rpx;
					width: 260rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-size: 30rpx;
					color: #fff;
					background: #444;

					&.red {
						background: #FF4C4C;
					}
				}
			}

		}
	}


	@keyframes slideIn {
		0% {
			transform: translateY(100%);
		}

		100% {
			transform: translateY(0);
		}
	}

	@keyframes slideOut {
		0% {
			transform: translateY(0);
		}

		100% {
			transform: translateY(100%);
		}
	}
</style>
